GtkModelButton: protect against show_all
authorMatthias Clasen <mclasen@redhat.com>
Thu, 6 Nov 2014 20:01:03 +0000 (15:01 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 6 Nov 2014 20:03:51 +0000 (15:03 -0500)
We don't want the labels to be shown when there's already
an icon.

gtk/gtkmodelbutton.c

index fa71c8a79a3f18043a3c4d0f3ee4314d3d23700d..79977d4ddcd5f36746f9350d4347406b465e5534 100644 (file)
@@ -975,8 +975,10 @@ gtk_model_button_init (GtkModelButton *button)
   gtk_widget_set_halign (button->box, GTK_ALIGN_FILL);
   gtk_widget_show (button->box);
   button->image = gtk_image_new ();
+  gtk_widget_set_no_show_all (button->image, TRUE);
   g_object_set (button->image, "margin", 4, NULL);
   button->label = gtk_label_new ("");
+  gtk_widget_set_no_show_all (button->label, TRUE);
   gtk_container_add (GTK_CONTAINER (button->box), button->image);
   gtk_container_add (GTK_CONTAINER (button->box), button->label);
   gtk_container_add (GTK_CONTAINER (button), button->box);